/**********************************************
这是代码自动生成的，如果重新生成，所做的改动将会丢失
系统:gpssolution
模块:系统平台
Itop.com 版权所有
生成者：Rabbit
生成时间:2012-8-1 10:14:11
***********************************************/

using System;
using System.Threading;
using System.ComponentModel;
namespace Itop.GpsCar.Model
{
    /// <summary>
    ///[sim]业务实体类
    ///对应表名:sim
    /// </summary>
    [Serializable]
    public class sim
    {
        
        #region Private 成员
        private int _sim_id=0; 
        private string _sim_serial=String.Empty; 
        private string _apn=String.Empty; 
        private string _vendor=String.Empty; 
        private string _phone_number=String.Empty; 
        private string _dial_number=String.Empty; 
        private string _username=String.Empty; 
        private string _password=String.Empty; 
        private DateTime _timestamp=new DateTime(1900,1,1); 
        private string _reserved_1=String.Empty; 
        private string _reserved_2=String.Empty;   
        #endregion
  
  
        #region Public 成员
   
        /// <summary>
        /// 属性名称：sim_id
        /// 属性描述：
        /// 字段信息：[sim_id],INT UNSIGNED
        /// </summary>
        [Browsable(false)]
        [DisplayNameAttribute("")]
        public int sim_id
        {
            get { return _sim_id; }
            set
            {			
                if (_sim_id as object == null || !_sim_id.Equals(value))
                {
                    _sim_id = value;
                }
            }			 
        }
  
        /// <summary>
        /// 属性名称：sim_serial
        /// 属性描述：
        /// 字段信息：[sim_serial],VARCHAR
        /// </summary>
        [DisplayNameAttribute("")]
        public string sim_serial
        {
            get { return _sim_serial; }
            set
            {			
                if(value==null)return;
                if( value.ToString().Length > 45)
                throw new Exception("[]长度不能大于45!");
                if (_sim_serial as object == null || !_sim_serial.Equals(value))
                {
                    _sim_serial = value;
                }
            }			 
        }
  
        /// <summary>
        /// 属性名称：apn
        /// 属性描述：
        /// 字段信息：[apn],VARCHAR
        /// </summary>
        [DisplayNameAttribute("")]
        public string apn
        {
            get { return _apn; }
            set
            {			
                if(value==null)return;
                if( value.ToString().Length > 45)
                throw new Exception("[]长度不能大于45!");
                if (_apn as object == null || !_apn.Equals(value))
                {
                    _apn = value;
                }
            }			 
        }
  
        /// <summary>
        /// 属性名称：vendor
        /// 属性描述：
        /// 字段信息：[vendor],VARCHAR
        /// </summary>
        [DisplayNameAttribute("")]
        public string vendor
        {
            get { return _vendor; }
            set
            {			
                if(value==null)return;
                if( value.ToString().Length > 45)
                throw new Exception("[]长度不能大于45!");
                if (_vendor as object == null || !_vendor.Equals(value))
                {
                    _vendor = value;
                }
            }			 
        }
  
        /// <summary>
        /// 属性名称：phone_number
        /// 属性描述：
        /// 字段信息：[phone_number],VARCHAR
        /// </summary>
        [DisplayNameAttribute("")]
        public string phone_number
        {
            get { return _phone_number; }
            set
            {			
                if(value==null)return;
                if( value.ToString().Length > 45)
                throw new Exception("[]长度不能大于45!");
                if (_phone_number as object == null || !_phone_number.Equals(value))
                {
                    _phone_number = value;
                }
            }			 
        }
  
        /// <summary>
        /// 属性名称：dial_number
        /// 属性描述：
        /// 字段信息：[dial_number],VARCHAR
        /// </summary>
        [DisplayNameAttribute("")]
        public string dial_number
        {
            get { return _dial_number; }
            set
            {			
                if(value==null)return;
                if( value.ToString().Length > 45)
                throw new Exception("[]长度不能大于45!");
                if (_dial_number as object == null || !_dial_number.Equals(value))
                {
                    _dial_number = value;
                }
            }			 
        }
  
        /// <summary>
        /// 属性名称：username
        /// 属性描述：
        /// 字段信息：[username],VARCHAR
        /// </summary>
        [DisplayNameAttribute("")]
        public string username
        {
            get { return _username; }
            set
            {			
                if(value==null)return;
                if( value.ToString().Length > 45)
                throw new Exception("[]长度不能大于45!");
                if (_username as object == null || !_username.Equals(value))
                {
                    _username = value;
                }
            }			 
        }
  
        /// <summary>
        /// 属性名称：password
        /// 属性描述：
        /// 字段信息：[password],VARCHAR
        /// </summary>
        [DisplayNameAttribute("")]
        public string password
        {
            get { return _password; }
            set
            {			
                if(value==null)return;
                if( value.ToString().Length > 45)
                throw new Exception("[]长度不能大于45!");
                if (_password as object == null || !_password.Equals(value))
                {
                    _password = value;
                }
            }			 
        }
  
        /// <summary>
        /// 属性名称：timestamp
        /// 属性描述：
        /// 字段信息：[timestamp],TIMESTAMP
        /// </summary>
        [DisplayNameAttribute("")]
        public DateTime timestamp
        {
            get { return _timestamp; }
            set
            {			
                if (_timestamp as object == null || !_timestamp.Equals(value))
                {
                    _timestamp = value;
                }
            }			 
        }
  
        /// <summary>
        /// 属性名称：reserved_1
        /// 属性描述：
        /// 字段信息：[reserved_1],VARCHAR
        /// </summary>
        [DisplayNameAttribute("")]
        public string reserved_1
        {
            get { return _reserved_1; }
            set
            {			
                if(value==null)return;
                if( value.ToString().Length > 45)
                throw new Exception("[]长度不能大于45!");
                if (_reserved_1 as object == null || !_reserved_1.Equals(value))
                {
                    _reserved_1 = value;
                }
            }			 
        }
  
        /// <summary>
        /// 属性名称：reserved_2
        /// 属性描述：
        /// 字段信息：[reserved_2],VARCHAR
        /// </summary>
        [DisplayNameAttribute("")]
        public string reserved_2
        {
            get { return _reserved_2; }
            set
            {			
                if(value==null)return;
                if( value.ToString().Length > 45)
                throw new Exception("[]长度不能大于45!");
                if (_reserved_2 as object == null || !_reserved_2.Equals(value))
                {
                    _reserved_2 = value;
                }
            }			 
        }
  
        #endregion 
  
        #region 方法
        public static string Newid(){
            return DateTime.Now.ToString("yyyyMMddHHmmssffffff");
        }
        public string CreateID(){
            Thread.Sleep(new TimeSpan(100000));//0.1毫秒
            return DateTime.Now.ToString("yyyyMMddHHmmssffffff");
        }
        #endregion		
    }	
}
